package com.github.bobjoy.java.jdk8;

import java.lang.reflect.Method;
import java.lang.reflect.Parameter;

public class ParameterNameDemo {

    public void test(String str, Integer i) {}

    public static void main(String[] arg) throws NoSuchMethodException {
        Method method = ParameterNameDemo.class.getMethod("test", String.class, Integer.class);
        for (Parameter param : method.getParameters()) {
            System.out.println(param.getName());
        }

    }
}
